<!DOCTYPE html>
<html class="loading" lang="en" data-textdirection="ltr" xmlns:th="http://www.thymeleaf.org">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=0, minimal-ui">
<meta name="author" content="PIXINVENT">
<title>部门信息查询与变更</title>
<link rel="stylesheet" type="text/css" th:href="@{/app-assets/css/vendors.css}">
<link rel="stylesheet" type="text/css" th:href="@{/app-assets/css/vertical-menu.css}">
<link rel="stylesheet" type="text/css" th:href="@{/app-assets/css/bootstrap-extended.css}">
</head>
<body>
<div class="content-wrapper">
  <div class="content-header ">

      <div class="content-header-left mb-2">
          <h3 class="content-header-title mb-0">部门信息查询与变更 </h3>
      </div>
  </div>
  <div class="card">
    <div class="card-content">
      <div class="card-body">
		  
		  <div class="searchbox">
          <form class="form-inline" method="get" th:action="@{/department_infor/department_infor}">
            <div class="form-group">
              <!--/*@thymesVar id="department" type="cn.niit.pm.entity.Department"*/-->
              <input name="departmentName" type="text" class="form-control" placeholder="请填写部门名称" th:value="${department.departmentName}">
            </div>
            <div class="form-group">
              <button type="submit" class="btn btn-primary">查询</button>
            </div>
          </form>
        </div>
        <div class="funcbtn clearfix">
          <div class="pull-left"><a class="btn btn-info" th:href="@{/department_infor/0}">
			   添加部门
			  </a></div>
        </div>
		  
        
		  <div class="tablebox1">
          <table class="table">
            <thead>
              <tr>
                <th>部门编号</th>
                <th>部门名称</th>
                <th>部门负责人</th>
                <th>操作</th>
              </tr>
            </thead>
            <tbody>
                <!--获取列表信息-->
              <tr th:each="department,stat : ${departmentList}">
                  <td>
                      <span th:text="${department.departmentId}"></span>
                  </td>
                  <td>
                      <span th:text="${department.departmentName}"></span>
                  </td>
                  <td>
                      <span th:text="${department.employeeName}"></span>
                  </td>
                  <td>
                  <a  class="btn btn-primary btn-td" th:href="@{/department_infor/{id}(id=${department.departmentId})}">修改</a>
                  <a  class="btn btn-danger btn-td" th:onclick="'del(' + ${department.departmentId} + ')'">删除</a>
                  </td>
              </tr>
            </tbody>
          </table>
              <!--分页组件-->
      </div>
    </div>
  </div>
</div>


    <script th:src="@{/app-assets/js/vendors.min.js}" type="text/javascript"></script>
    <script th:src="@{/app-assets/js/app-menu.js}" type="text/javascript"></script>
    <script th:src="@{/app-assets/js/app.js}" type="text/javascript"></script>
    <script th:src="@{/app-assets/js/echarts.min.js}" type="text/javascript"></script>
    <script th:src="@{/app-assets/js/sweetalert2.js}" type="text/javascript"></script>

    <script th:src="@{/app-assets/js/rollpage.js}" type="text/javascript"></script>
    <script th:src="@{/app-assets/js/department.js}" type="text/javascript"></script>
    <script>

document.getElementById("demo2").onclick = function() {
    swal({
        title: "确认要取消吗 ？", 
        type: "warning",
        showCancelButton: true,
        confirmButtonColor: "#DD6B55",
        confirmButtonText: "确认",
      	closeOnConfirm: false
    }
	)
};

		</script>
</div>
</body>
</html>